https://data.census.gov/cedsci/table?q=race&g=0400000US47%240500000

Since both of these counties can be their own districts based off of population itself, I am going to use them to create a double rep district that has 2 reps with double the population of other districts. This will bring our 9 districts down to 7.

Objective Function:

Minimize

$\sum_{i=1}^{7} |\frac{white\_pop_i}{total\_pop_i} - white\_pop\_prop|$

Since PuLp does not intake division, the objective function is rewritten to:

$\sum_{i=1}^{7} |{white\_pop_i} - {total\_pop_i} \times white\_pop\_prop|$

Using absolute value principle:

$y \leq |x|$

$-y \leq x \leq y$

References:

https://towardsdatascience.com/how-to-draw-congressional-districts-in-python-with-linear-programming-b1e33c80bc52